package com.nebula.tlggoods.controller;

import com.nebula.tlggoods.service.ShopService;
import com.nebula.tlggoods.tools.Record;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 店铺控制层
 */
@RestController
public class ShopController {

    @Resource
    private ShopService shopService;

    /**
     * 店铺列表
     *
     * @param pageNum  页码
     * @param pageSize 每页显示数量
     * @param keyword  关键字
     * @return
     */
    @GetMapping("/shopList")
    @ApiOperation(notes = "店铺列表", value = "店铺列表")
    public Record shopList(Integer pageNum, Integer pageSize, String keyword) {
        return shopService.findAllByFuzzyNameAndPaging(pageNum, pageSize, keyword);
    }
}
